var request = require('request');

var webhook = 'https://open.feishu.cn/open-apis/bot/v2/hook/ad63bb92-fe14-449f-8d9e-36c90ca2dda5'

function sendMsg(content) {
	var options = {
		headers: {
			"Content-Type": "application/json"
		},
		url: webhook,
		method: 'POST',
		json: true,
		body: {
			msg_type: "text",
			content: {
				text:content
			}
		}
	};
	// console.log("options: ",options);
	function callback(error, response, data) {
		if (!error && response.statusCode == 200) {
			console.log('res: ', data);
		}
	}
	request(options, callback);
}

module.exports = {
	sendMsg
}
